<?php
/**
 * DCRM Mobile Page
 *
 * This file is part of WEIPDCRM.
 * 
 * WEIPDCRM is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WEIPDCRM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with WEIPDCRM.  If not, see <http://www.gnu.org/licenses/>.
 */

require_once('system/common.inc.php');
base_url();

// URL For Rewrite 
$rewrite_mod = get_option('rewrite_mod');
switch($rewrite_mod){
	case 3:
		$rewrite_url = array('public' => 'public-%d.html','ios9public' => 'public-list-iOS9-%d.html','down2' => 'downloads-list-%d.html','ios10public' => 'public-list-iOS10-%d.html','ios11public' => 'public-list-iOS11-%d.html','iospublic' => 'public-list-iOSClass-%d.html','search' => 'search-mfss.html','public_nohistory' => 'public/%d/nohistory', 'screenshot' => 'screenshot/%d', 'history' => 'history/%d', 'contact' => 'contact/%d', 'pcsection' => 'list-%d.html','7public' => 'public-SevenDay-%d.html','bpublic' => 'public-Halfyear-%d.html','30public' => 'public-OneMonth-%d.html','3public' => 'public-ThreeDay-%d.html','mipublic' => 'list-pg-%d.html','mipcpage' => 'list-%1$d-pg-%2$d.html', 'report' => 'report/%d', 'report_support' => 'report/%1$d/%2$d', 'more' => 'more/%d', 'more_offset' => 'more/%1$d/%2$d', 'misc' => 'misc','down' => 'downloads.html');
		break;
	case 1:
	case 2:
	default:
		$rewrite_url = array('view' => 'index.php?method=view&amp;pid=%d', 'view_nohistory' => 'index.php?pid=%d&amp;addr=nohistory', 'screenshot' => 'index.php?method=screenshot&amp;pid=%d', 'history' => 'index.php?method=history&amp;pid=%d', 'contact' => 'index.php?method=contact&amp;pid=%d', 'section' => 'index.php?method=section&amp;pid=%d', 'report' => 'index.php?method=report&amp;pid=%d', 'report_support' => 'index.php?method=report&amp;pid=%1$d&amp;support=%2$d', 'more' => 'index.php?method=more&amp;pid=%d', 'more_offset' => 'index.php?method=more&amp;pid=%1$d&amp;offset=%2$d', 'misc' => 'misc.php');
		break;
}
function echo_rewrite_url($type, $variable1, $variable2=''){
	global $rewrite_url;
	echo SITE_URL;
	printf($rewrite_url[$type], $variable1, $variable2);
}

class_loader('Mobile_Detect');
$detect = new Mobile_Detect;
if(!$detect->isiOS()){
	if (DCRM_PCINDEX == 1) {
		header("Location: ".SITE_URL.$rewrite_url['misc']);
		exit();
	} else {
		$isCydia = false;
	}
} else {
	if (DCRM_MOBILE == 2) {
		if (!strpos($detect->getUserAgent(), 'Cydia')) {
			$isCydia = false;
		} else {
			$isCydia = true;
		}
	} else {
		exit('Access Denied');
	}
}
if (file_exists('Release')) {
	$release = file('Release');
	$release_origin = __('No Name');
	$release_mtime = filemtime('Release');
	$release_time = date('Y-m-d H:i:s',$release_mtime);
	foreach ($release as $line) {
		if(preg_match('#^Origin#', $line)) {
			$release_origin = trim(preg_replace("#^(.+):\\s*(.+)#","$2", $line));
		}
		if(preg_match("#^Description#", $line)) {
			$release_description = trim(preg_replace("#^(.+):\\s*(.+)#","$2", $line));
		}
	}
} else {
	$release_origin = __('Empty Page');
}
if (isset($_GET['pid'])) {
	if (ctype_digit($_GET['pid']) && intval($_GET['pid']) <= 10000) {
		function device_check(){
			global $detect;
			$device_type = array('iPhone', 'iPod', 'iPad');
			for ($i = 0; $i < count($device_type); $i++) {
				$check = $detect->version($device_type[$i]);
				if ($check !== false) {
					if (isset($_SERVER['HTTP_X_MACHINE'])) {
						$DEVICE = $_SERVER['HTTP_X_MACHINE'];
					} else {
						$DEVICE = 'Unknown';
					}
					$OS = str_replace('_', '.', $check);
					break;
				}
			}
			return array('DEVICE' => $DEVICE, 'OS' => $OS);
		}

		if (isset($_GET['method']) && $_GET['method'] == 'screenshot') {
			$index = 2;
			$title = __('View Screenshots');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'report') {
			$device_info = device_check();
			if (!isset($_GET['support'])) {
				$index = 3;
			} else {
				if ($_GET['support'] == '1') {
					$support = 1;
				} elseif ($_GET['support'] == '2') {
					$support = 2;
				} elseif ($_GET['support'] == '3') {
					$support = 3;
				} else {
					$support = 0;
				}
				$index = 4;
			}
			$title = __('Report Problems');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'history') {
			$index = 5;
			$title = __('Version History');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'contact') {
			$index = 6;
			$title = __('Contact us');
		} elseif (isset($_GET['method']) && $_GET['method'] == 'pcsection') {
			$index = 7;
          $section = DB::fetch_first("SELECT `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections` WHERE `ID` = '".(int)$_GET['pid']."'");
			$title = __(DB::real_escape_string($section['Name']));
		} elseif (isset($_GET['method']) && $_GET['method'] == 'more') {
			$index = 8;
			$section = DB::fetch_first("SELECT `Name`, `Icon` FROM `".DCRM_CON_PREFIX."Sections` WHERE `ID` = '".(int)$_GET['pid']."'");
			$q_name = DB::real_escape_string($section['Name']);
			if (isset($_GET['offset']) && !empty($_GET['offset']) && ctype_digit($_GET['offset'])) {
				$offset = intval($_GET['offset']);
			} else {
				$offset = 0;
			}
			$packages = DB::fetch_all("SELECT `ID`, `Name`, `Package` FROM `".DCRM_CON_PREFIX."Packages` WHERE (`Stat` = '1' AND `Section` = '".$q_name."') ORDER BY `ID` DESC LIMIT 10 OFFSET ".$offset);
			foreach($packages as $package){
				if(!empty($package)){
					if ($isCydia) { ?>
				<a href="cydia://package/<?php echo($package['Package']); ?>" target="_blank">
<?php					} else { ?>
				<li>
	<a href="<?php echo_rewrite_url('pc', $package['ID']);?>" class="app_icon" >
<?php					} ?>
	
    
<div class="desc" ><?php echo ($package['Description']);  ?></div>
</li>
<?php
				}
			}
			exit();
		} elseif (!isset($_GET['method']) || (isset($_GET['method']) && $_GET['method'] == 'public')) {
			$index = 1;
			$title = __('View Package');
			$package_id = (int)DB::real_escape_string($_GET['pid']);
			$package_info = DB::fetch_first("SELECT `Name`, `Version`, `Author`, `Package`, `Description`, `DownloadTimes`, `Multi`, `CreateStamp`, `Size`, `Installed-Size`, `Section`, `Homepage`, `Tag`, `Level`, `Price`, `Purchase_Link`, `Changelog`, `Changelog_Older_Shows`, `Video_Preview`, `System_Support`, `ScreenShots` FROM `".DCRM_CON_PREFIX."Packages` WHERE `ID` = '".$package_id."' LIMIT 1");
			if ($package_info) $title = $package_info['Name'];
		} else {
			httpinfo(405);
			exit();
		}
	} else {
		httpinfo(405);
		exit();
	}
} elseif (!isset($_GET['method'])) {
	$index = 0;
	$title = $release_origin;
} else {
	httpinfo(405);
	exit();
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title><?php echo($title); ?> | 最简洁的中文源</title>
		<meta charset="utf-8">
		<meta name="robots" content="index, follow" />
      <mobile:mobile type="pc,mobile"/>
<?php
if (defined("AUTOFILL_SEO")) {
?>
		<meta name="title" content="<?php echo(AUTOFILL_SEO); ?>" />
<?php
}
if (!empty($release_description)) {
?>
		<meta name="description" content="<?php echo($release_description); ?>" />
<?php
}
if (defined("AUTOFILL_KEYWORDS")) {
?>
		<meta name ="keywords" content="<?php echo(AUTOFILL_KEYWORDS); ?>" />
<?php
}
if ($isCydia) {
?>
		<base target="_blank">
<?php
} else {
?>
		<base target="_top">
<?php
}
?>
<link rel="apple-touch-icon" href="<?php echo(SITE_URL); ?>CydiaIcon.png">
<link rel="shortcut icon" href="<?php echo(SITE_URL); ?>favicon.ico">
<link rel="stylesheet" type="text/css" href="<?php echo(SITE_URL); ?>/ziyuan/css/base.css" />
<link rel="stylesheet" type="text/css" href="<?php echo(SITE_URL); ?>/ziyuan/css/list.css" />
<link rel="stylesheet" type="text/css" href="<?php echo(SITE_URL); ?>/ziyuan/css/rank.css" />
      <script type="text/javascript" src="<?php echo(SITE_URL); ?>/baohu.js"></script>
<script type="text/javascript" src="<?php echo(SITE_URL); ?>/ziyuan/js/postbird-img-glass.js" ></script>
	</head>
	<body class="pinstripe">
		<panel>
<?php
$repo_url = base64_decode(DCRM_REPOURL);
if ($index == 0) {
	if (!$isCydia) {
?>
			 <!-- Global Topbar -->
    <div class="global_topbar_wrap">
		<div id="global_topbar" class="global_topbar">
			<div class="wrap inner">
                    
<?php                                                                 
    if (defined("AUTOFILL_PCDBZDYMC1") or defined("AUTOFILL_PCDBZDY1") or defined("AUTOFILL_ZTMHDZ1") or defined("AUTOFILL_ZTMHDZMC1") or defined("AUTOFILL_YYWXZQ1") or defined("AUTOFILL_YYWXZQMC1") or defined("AUTOFILL_YYZJBB1") or defined("AUTOFILL_YYZJBBMC1") or defined("AUTOFILL_WLPJHZ1") or defined("AUTOFILL_WLPJHZMC1")) {
?>              
				<div class="services" id="global_topbar_services">
					<ul>
<?php
                                                                   
    if (defined("AUTOFILL_PCDBZDY1") && defined("AUTOFILL_PCDBZDYMC1")) {
?>                        
                    <li class="current"><a href="<?php echo(AUTOFILL_PCDBZDY1); ?>"><i class="weiphone"></i><?php echo(AUTOFILL_PCDBZDYMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_ZTMHDZ1") && defined("AUTOFILL_ZTMHDZMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_ZTMHDZ1); ?>" target="_blank"><i class="wegame"></i><?php echo(AUTOFILL_ZTMHDZMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_YYZJBB1") && defined("AUTOFILL_YYZJBBMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_YYZJBB1); ?>" target="_blank"><i class="fengbuy"></i><?php echo(AUTOFILL_YYZJBBMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_WLPJHZ1") && defined("AUTOFILL_WLPJHZMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_WLPJHZ1); ?>" target="_blank"><i class="wper"></i><?php echo(AUTOFILL_WLPJHZMC1); ?></a></li>
<?php
    }                                                                     
    if (defined("AUTOFILL_YYWXZQ1") && defined("AUTOFILL_YYWXZQMC1")) {
?>                       
						<li><a href="<?php echo(AUTOFILL_YYWXZQ1); ?>" ><i class="weand"></i><?php echo(AUTOFILL_YYWXZQMC1); ?></a></li>
                     
<?php
	}
?>						
                     
					</ul>
					<a href="javascript:;" class="expand"><span>展开</span></a>
				</div>               
<?php
	}
?>	              
				<div class="links" id="globar_topbar_links">
					<ul>
						<li><a href="<?php echo(SITE_URL); ?>" target="_blank">首页</a></li>
<?php
	if (defined("AUTOFILL_PCDBZDY") && defined("AUTOFILL_PCDBZDY_NAME")) {
?>              
			<li><a href="<?php echo(AUTOFILL_PCDBZDY); ?>" target="_blank"><?php echo(AUTOFILL_PCDBZDY_NAME); ?></a></li> 
<?php
	}
?> 
					</ul>
					<div class="focus"><em></em></div>
				</div>
                <div class="user_menu">
				<ul>
<?php
require_once 'qqlogin/function.php';
require_once 'qqlogin/Connect2.1/qqConnectAPI.php';	
?>                  
<?php if(!isset($_SESSION["accesstoken"]) || !isset($_SESSION["openid"])) { ?>
		<li><a href="/qqlogin/qqlogin.php">登录</a></li>        
<?php } else { 
    $qc = new QC($_SESSION["accesstoken"],$_SESSION["openid"]);
    $arr = $qc->get_user_info();           
?>  
                <li><img class="icon" src="<?php echo $arr['figureurl_qq_2'];?>" style="border-radius: 50%; width: 20px; height: 20px; box-shadow:0 0 1px #AAA;padding:1px;margin-right: 1px;"></li>  
                <li>用户名：<?php echo $arr['nickname'];?></li>  
				<li><a href="User.php" target="_blank">个人中心</a></li>
                <li><a onclick="cookipost()" >退出登录</a></li>  
 <script language="javascript">
    function cookipost(){
      $.get("/qqlogin/qqlogout.php", function(result){
    	location.reload();
  	  });  
	}
</script>                  
<?php
}
?> 
                  
      
 <?php 
if(isset($_SESSION["accesstoken"]) || isset($_SESSION["openid"])) {      
$User=$arr["nickname"];
$Logo=$arr['figureurl_qq_2'];
$Openid=$_SESSION["openid"];
$date=date("Y-m-d h:i:s");
$ip = ($ip) ? $ip : $_SERVER["REMOTE_ADDR"];   
if($row=DB::result_first("SELECT * FROM `".DCRM_CON_PREFIX."User` WHERE `Openid`='".$Openid."'" )){    
  $sql = DB::query("UPDATE `".DCRM_CON_PREFIX."User` SET `Logo` = '".$Logo."', `User` = '".$User."',`IP` = '".$ip."' WHERE `Openid`='".$Openid."'");
} else {  
  $query = DB::query("INSERT INTO `".DCRM_CON_PREFIX."User` (ID,User,Logo,Openid,Packages,Collection,TimeStamp,IP) VALUES ('','$User','$Logo','$Openid','','','$date','$ip')");
}      
}
?> 
                 
				</ul>
			    </div>
			</div>
		</div>
	</div> 
 <!-- Header -->
<div class="header_wrap">
	<div id="header" class="header">
		<div class="wrap_con header_inner">
			<h2><a href="<?php echo(SITE_URL); ?>"><?php echo(AUTOFILL_SEO); ?></a></h2>
			<div class="navigator">
				<ul>
					<li >
						<a href="<?php echo(SITE_URL); ?>">
							<i class="home"></i><span>首页</span>
						</a>
					</li>
					<li >
						<a href="<?php echo(SITE_URL); ?>public.html">
							<i class="list"></i><span>资源列表</span>
						</a>
					</li>
<?php
	if (defined("AUTOFILL_PCZDYDH") && defined("AUTOFILL_PCZDYDH_NAME")) {
?>                   
					<li >
						<a href="<?php echo(AUTOFILL_PCZDYDH); ?>">
							<i class="rank"></i><span><?php echo(AUTOFILL_PCZDYDH_NAME); ?></span>
						</a>
					</li>
<?php
    }                                                                     
    if (defined("AUTOFILL_PCZDYDH2") && defined("AUTOFILL_PCZDYDH2_NAME")) {
?>                   
					<li >
					     <a href="<?php echo(AUTOFILL_PCZDYDH2); ?>" >
						<i class="me"></i><span><?php echo(AUTOFILL_PCZDYDH2_NAME); ?></span>
                         </a>
					</li>
                           
<?php
    }                                                                     
?>   
				</ul>
			</div>
		</div>
	</div>
</div>                    
<!-- 变化开始 -->
<!-- main4 -->
<!--资源列表-->
<div class="resource_list clearfix">
	<div class="wrap_con">
		<h1>捐助我们</h1>
		<div class="platform">
			<a href="" class="current">
			<em class="iphone" title="iPhone">iPhone</em> 
			<em class="ipad" title="iPad">iPad</em></a>
			<a href="" >
			<em class="iphone" title="iPhone">iPhone</em></a>
			<a href="" >
			<em class="ipad" title="iPad">iPad</em></a>
		</div>
      <!--列表内容展示-->
<div class="search_box">
				<form action="search.php" method="get" >	
					<span class="txt">
						<input class="input" type="text" name="name"  placeholder="搜索你想要的" required="required" />
					</span>
					<span class="btn"><button type="submit" id="search_btn"><i></i>搜索</button></span>
				</form>
			</div>
	</div>
</div>
<?php
	}
?>

<div class="soft_game clearfix">
	<div class="wrap_con">

	  <div class="rank_app1" id="app_list">
		  <div class="commen_title">
				<h1>
					<span>关于我们</span>
				</h1>
		  </div>
			<ul>
			
				<h1 style="text-align:center;font-size:30px;">
	<strong>关于我们</strong> 
</h1>
<br>
<p>
	我们是一群苹果手机爱好者，通过互联网结实，来自全国各地
</p>
<p>
	有学生，有医生，有劳务派遣员，有交通协警
</p>
<p>
	我们有一个共同的特点--我们都是年轻人--我们热爱分享和交流
</p>
<br>
<p>
	如果你觉得<?php echo(AUTOFILL_SEO); ?>的小东西对你的手机有所帮助，请给我们捐助
</p>
<p>
	你的捐助能帮助我们更好的折腾。
</p>
<br>
<p>
	用 微信 或者 支付宝 扫描下面的二维码就可以给我们捐助了
</p>
<p>
	另外也可以手动输入 支付宝账户 478066693@qq.com
</p>
<br>
<br>
<p>
	手机端：点击 <strong><span><a href="HTTPS://QR.ALIPAY.COM/FKX06740ZMZSP9EDWXJO2E" target="_blank">478066693@qq.com</a></span></strong>&nbsp;向我们捐助
</p>
<hr>
<p>
	电脑端：直接点击以下 <strong>二维码</strong> 向我们捐助
</p>
<p>
	<br>
</p>
<p>
	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="./wechat.png" alt=""> 
</p>
<p>
	&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<strong>最后 感谢您对<?php echo(AUTOFILL_SEO); ?>的支持</strong> 
</p>
<p style="text-align:right;">
	&nbsp;<?php echo(AUTOFILL_SEO); ?>
</p>
<p style="text-align:right;">
	2018年4月1日
</p>
				
			</ul>	
		</div>
	</div>
</div>		

<div class="soft_game clearfix">
	<div class="wrap_con">

	  <div class="rank_app" id="app_list">
		  <div class="commen_title">
				<h1>
					<span>捐助排行榜</span>
				</h1>
		  </div>
			<ul>



<fieldset style="background:#;border-radius:13px;&gt;Color&lt;">			
  <?php

          
          $ress = DB::query("SELECT * FROM `".DCRM_CON_PREFIX."Activation`ORDER BY `Level` DESC limit 1000");
		foreach($ress as $res){    
          $resss = DB::query("SELECT * FROM `".DCRM_CON_PREFIX."User` WHERE  `Openid`='".$res['OPENID']."' ORDER BY `ID` DESC limit 1");
		foreach($resss as $ress){ 
?>     
    <li> 
					
					<div class="play_songs" style="display:block;">
						<a class="thumbnail">
							<img src="<?php echo $ress['Logo'] ?>" height="90" width="90" alt="">	
						</a>
						<div class="songs_name"><a><?php echo $ress['User'] ?></a></div>
						<br>
<?php
          $re1 = DB::query("SELECT * FROM `".DCRM_CON_PREFIX."Activation` WHERE `Openid`='".$res['OPENID']."'ORDER BY `Level` DESC limit 1");
		foreach($re1 as $re){       
?>                        
						<div class="star_s"><span style="<?php if($re['Level']=='2'){echo 'width:20%;';}if($re['Level']=='3'){echo 'width:40%;';}  if($re['Level']=='4'){echo 'width:60%;';}       if($re['Level']=='5'){echo 'width:70%;';}      if($re['Level']=='6'){echo 'width:80%;';} if($re['Level']=='7'){echo 'width:100%;';}  ?>"></span></div>				
                      <span class="type_app"><a>

                         <?php
                         if($re['Level']=='2'){echo '捐助金额：￥10.00元';}
                         if($re['Level']=='3'){echo '捐助金额：￥20.00元';}  
                         if($re['Level']=='4'){echo '捐助金额：￥30.00元';}       
                         if($re['Level']=='5'){echo '捐助金额：￥40.00元';}      
                         if($re['Level']=='6'){echo '捐助金额：￥50.00元';}       
                         if($re['Level']=='7'){echo '捐助金额：￥100.00元';}
                         ?></a></span>   
 <?php
	}
?>                      
					</div>
    </li>
				<hr>
 <?php
	}}
?>     
								
 </fieldset> 
			</ul>	

		</div>
	</div>
</div>
 
<?php
	}
?>


  
<!-- footer -->
<!--随便看看-->
    <div class="footer">
      <div class="wrap_con">
        <h3>旗下网站</h3>
        <div class="footer_nav">
			<a href="http://mycydia.vip" target="_blank">博客</a>
			|
			<a href="<?php echo(SITE_URL); ?>" target="_blank">Cydia源</a>
			|
			<a class="hint-new" href="http:<?php echo(SITE_URL); ?>/help/9.php" target="_blank">版权与免责声明</a>
		</div>
		<p><a href="http://www.miitbeian.gov.cn/" target="_blank">
          <?php if(defined("AUTOFILL_FOOTER_CODE")){ ?>
					<?php echo(stripslashes(AUTOFILL_FOOTER_CODE));?> </a></p>
		  <?php } ?>

        
		<p><a  style="color: #c0392b;" >Copyright <?php printf( __( 'Copyright &copy; %s' ) , defined("AUTOFILL_FOOTER_YEAR") ? htmlspecialchars(stripslashes(AUTOFILL_FOOTER_YEAR)).'-'.date("Y") : date("Y") ); ?>  http:<?php echo(SITE_URL); ?> ®. All rights reserved. <?php echo(AUTOFILL_SEO); ?>版权或产权保护</a></p>
	</div>
    </div>
        
<div class="bottom_fix">
<!--返回顶部-->
<a href="javascript:;" class="go_top" id="go_top_btn">返回顶部</a>
</div>
   <?php
	if (defined("AUTOFILL_BAIDUTJ")) {
?>
<?php echo(AUTOFILL_BAIDUTJ); ?>
  <?php
	}
?> 
<script type="text/javascript" src="<?php echo(SITE_URL); ?>ziyuan/js/jquery-1.7.min.js" ></script>
<script type="text/javascript" src="<?php echo(SITE_URL); ?>ziyuan/js/common.js"></script>
<script>
        PostbirdImgGlass.init({
            domSelector:".img-container img",
            animation:true
        });
</script>
<script type="text/javascript" >
//global options
var STATIC_URL = '<?php echo(SITE_URL); ?>';
$.ajaxSetup({ cache:true });
ds.Dialog.defaults.iconBasePath = 'ziyuan/images/';

//Navigator autoFixed
$.getScript(STATIC_URL + 'ziyuan/js/jquery.autoFixed.js', function(){
	$('#header').autoFixed();
});

//返回顶部
jQuery(function($){
	var timer, view = $(window), btn = $('#go_top_btn');

	function scrollHandler(){
		clearTimeout(timer);
		timer = setTimeout(checkScroll, 160);
	}
	function checkScroll(){
		var top = view.scrollTop();
		btn[top > 100 ? 'removeClass' : 'addClass']('hide');
	}

	btn.bind('click', function(){
		btn.addClass('hide');
		ds.scrollTo(0);
	});
	view.bind('scroll', scrollHandler);
	scrollHandler();
});
</script>	

<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
		
	</body>
</html>
